use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Clone)]
pub struct AppItem {
    #[serde(rename = "More")]
    pub more: String,
    #[serde(rename = "Name")]
    pub name: String,
    #[serde(rename = "Pkgname")]
    pub pkgname: String,
    #[serde(rename = "Tags")]
    pub tags: Option<String>,
    #[serde(rename = "Update")]
    pub update: String,
    pub icon: Option<String>,
    pub category: Option<String>,
}

#[derive(Serialize, Deserialize, Clone)]
pub struct AppDetail {
    #[serde(rename = "More")]
    pub more: String,
    #[serde(rename = "Name")]
    pub name: String,
    #[serde(rename = "Pkgname")]
    pub pkgname: String,
    #[serde(rename = "Tags")]
    pub tags: Option<String>,
    #[serde(rename = "Update")]
    pub update: String,
    #[serde(rename = "Icon")]
    pub icon: Option<String>,
    #[serde(rename = "Category")]
    pub category: Option<String>,
    #[serde(rename = "Version")]
    pub version: String,
    #[serde(rename = "Filename")]
    pub filename: String,
    #[serde(rename = "Author")]
    pub author: String,
    #[serde(rename = "Contributor")]
    pub contributor: String,
    #[serde(rename = "Website")]
    pub website: Option<String>,
    #[serde(rename = "Size")]
    pub size: String,
    #[serde(rename = "DownloadTimes")]
    pub download_times: Option<i32>,
}
